package cn.xingyun.pickaxe_loli_new.util;

import cn.xingyun.pickaxe_loli_new.item.LolipickaxeItem;
import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
import org.jetbrains.annotations.Nullable;

import java.util.Map;

public class PickLoliInt2ObjectHashMap<V> extends Int2ObjectLinkedOpenHashMap<V> {
    @Override
    public V put(Integer key, V value) {
        if (LolipickaxeItem.DarkNameList.contains(value.getClass().getName())) {
            return null;
        }
        return super.put(key, value);
    }

    @Override
    public V put(int k, V v) {
        return super.put(k, v);
    }

    @Override
    public void putAll(Map<? extends Integer, ? extends V> m) {
        super.putAll(m);
    }

    @Override
    public V get(int k) {
        return super.get(k);
    }

    @Override
    public V get(Object key) {
        return super.get(key);
    }
}
